{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8765db4c-30ca-4cd2-80ab-75fe45768737",
   "metadata": {},
   "source": [
    "# Multi-Series Time-Series Plot\n",
    "\n",
    "A line plot showing multiple time-series on the same chart. This example shows how to compare multiple variables over time using a common date index."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1912b392-a821-45bd-8daa-7806ee9f62bd",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "\n",
    "np.random.seed(0)\n",
    "dates = pd.date_range(\"2024-01-01\", periods=30, freq=\"D\")\n",
    "data = {\n",
    "    'Series A': np.cumsum(np.random.randn(30)),\n",
    "    'Series B': np.cumsum(np.random.randn(30)),\n",
    "    'Series C': np.cumsum(np.random.randn(30))\n",
    "}\n",
    "df = pd.DataFrame(data, index=dates)\n",
    "\n",
    "df.hvplot.line(title=\"Multi-Series Time-Series Plot (Bokeh)\", rot=45)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eaaa0d77-eed5-4614-867f-f6e1ff551cf7",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Multi-series time-series plot with Matplotlib\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "hvplot.extension('matplotlib')\n",
    "\n",
    "np.random.seed(0)\n",
    "dates = pd.date_range(\"2024-01-01\", periods=30, freq=\"D\")\n",
    "data = {\n",
    "    'Series A': np.cumsum(np.random.randn(30)),\n",
    "    'Series B': np.cumsum(np.random.randn(30)),\n",
    "    'Series C': np.cumsum(np.random.randn(30))\n",
    "}\n",
    "df = pd.DataFrame(data, index=dates)\n",
    "\n",
    "df.hvplot.line(title=\"Multi-Series Time-Series Plot (Matplotlib)\", rot=45)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e50cf665-a4bd-4c5b-a6ee-e9140df054ff",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Line Plots reference documentation](../../ref/api/manual/hvplot.hvPlot.line.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
